package com.atguigu.gmall.web.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @author 李旭
 * @date 2022/1/15 14:44
 * @Description:
 */
@Controller
public class LoginController {


    //http://passport.gmall.com/login.html?originUrl='+ encodeURIComponent(window.location.href);
    @GetMapping("/login.html")
    public String toLogin(String originUrl, Model model){
        //登录成功之后的重定向路径
        model.addAttribute("originUrl",originUrl);
        return "login";
    }
}
